package com.stars.services.system;

import com.github.pagehelper.PageInfo;
import com.stars.common.result.VueTreeItem;
import com.stars.entity.dto.TreeSearchDTO;
import com.stars.entity.dto.sys.SystemPermissionDTO;
import com.stars.entity.sys.SystemPermission;

import java.util.List;

/**
 * Created by luodajie on 2019/1/5.
 */
public interface PermissionAccessService {
    /**
     * 根据id查询
     * @param id
     * @return
     * @throws Exception
     */
    SystemPermission findByEntityId(String id) throws Exception;

    /**
     * 分页查询
     * @param pageNum
     * @return
     * @throws Exception
     */
    PageInfo<SystemPermissionDTO> findByPage(Integer pageNum, Integer pageSize, SystemPermissionDTO command) throws Exception;

    /**
     * 查询全部
     * @return
     * @throws Exception
     */
    List<VueTreeItem>  findByAll() throws Exception;



    /**
     * 根据父类id，查询子类
     * @param id 父类id
     * @return
     * @throws Exception
     */
    List<SystemPermissionDTO> findByPid(String id)throws Exception;

    /**
     * 根据菜单类型查询菜单。
     * @param perType
     * @return
     * @throws Exception
     */
    List<SystemPermissionDTO> findPermissionByPerType(String perType) throws Exception;
}
